<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib  uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>素材数据统计</title>
<link type="text/css" rel="stylesheet" href="${ctx }/resources/css/WdatePicker.css"/>
<link type="text/css" rel="stylesheet" href="${ctx }/resources/css/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" href="${ctx }/resources/css/datepicker.css"/>
<script type="text/javascript" src="${ctx }/resources/js/WdatePicker.js"></script>
<link type="text/css" rel="stylesheet" href="${ctx }/resources/css/main.css"/>
<link type="text/css" rel="stylesheet" href="${ctx }/resources/css/body.css"/>
<style type="text/css">
*{margin:0;padding:0;}
.all{
	float:left;
	width:100%;
}
.table{
width:50%;}
/* .menu{
	float:left;
	width:326px;
	margin-left: 200px;
	margin-top:70px;
} */
/* .body{
	float:left;
	width:800px;
	margin-left: 100px;
	margin-top:72px;
} */
</style>
</head>
<body>
<%-- <jsp:include page="../common/head.jsp"></jsp:include> --%>
<div class="all">
		<%-- <div class="menu">
			<jsp:include page="../common/menu.jsp"></jsp:include>
		</div> --%>
		<div class="main">
			<div class="iconDiv">
				<div class="imageDetail"><img src="${ctx }/resources/images/logo.png"></div>
			</div>
			<div class="ulContent">
				<jsp:include page="../common/menu.jsp"></jsp:include>
			</div>
		</div>
	<div class="body">
	<%-- <div class="bodyHead">
		<div class="logoutDiv pull-right">
			<a class="btn btn-primary" href="${ctx }/logout">用户登出</a>
		</div>
	</div> --%>
	<jsp:include page="../common/bodyHead.jsp"></jsp:include>
	<div class="formDiv">
		<form action="${ctx }/admin/material/list" class="form-horizontal" method="post">
			<div class="form-group">
				 <label for="firstname" class="col-sm-2 control-label">素材统计信息</label>
				 <div class="col-sm-4">
					<select class="form-control" name="materialRecords">
						<option <c:if test="${action == 'download' }">selected</c:if> value="download">素材的下载量</option>
						<option <c:if test="${action == 'makeVideo' }">selected</c:if> value="makeVideo">素材制作视频数量</option>
						<option <c:if test="${action == 'photograph' }">selected</c:if> value="photograph">素材拍照数量</option>
						<option <c:if test="${action == 'picShare' }">selected</c:if> value="picShare">素材图片的分享量</option>
						<option <c:if test="${action == 'videoShare' }">selected</c:if> value="videoShare">素材的视频的分享量</option>
					</select>
				</div>
				
			</div>
			<div class="form-group">
				<label for="firstname" class="col-sm-2 control-label">设备版本信息</label>
				 <div class="col-sm-4">
				<select class="form-control" name="versionType">
								<option <c:if test="${versionType == 'ios' }">selected</c:if> value="ios">IOS系统</option>
								<option <c:if test="${versionType == 'android' }">selected</c:if> value="android">安卓系统</option>
				</select>
				</div>
			</div>
			
			<div class="form-group">
				<div class="col-sm-2"></div>
				<div class="col-sm-2">
				从 <input name="from" class="Wdate " type="text" value="${from }" onClick="WdatePicker()">
				</div>
				<div class="col-sm-2">
				到<input name="to" class="Wdate" type="text" value="${to }" onClick="WdatePicker()">
				</div>
				<div class="col-sm-2">
				<input type="submit" class="btn btn-default" value="查询"/>
				</div>
			</div>
		</form>
	</div>

<c:if test="${! empty records }">
	<div class="tableDiv">
	<table class="table table-bordered">
			<tr>
				<td>素材uuid</td>
				<td>设备类型</td>
				<td>数量</td>
			</tr>
		
		<c:forEach items="${records }" var="count">
		<tr>
			<td>${count[0] }</td>
			<td>${count[1] }</td>
			<td>${count[2] }</td>
		</tr>
		</c:forEach>	
	</table>
	</div>
</c:if>
</div>
</div>
</body>
</html>